<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            position: relative;
            width: 150px;
            height: 30px;
            border: 1px solid #ccc;
        }
        .box::after{
            position: absolute;
            right: 0;
            top: 8px;
            content: '';
            height: 10px;
            margin-right: 10px;
           transition: all 0.3s;
            width: 10px;
            border:1px solid #ccc ;
            border-top:none;
            border-right: none;
           transform: rotate(-45deg);
        }
        .box:hover::after{
            transform: rotate(135deg);
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>